import {
	defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
	plugins: [vue()],
	//配置跨域
	server: {
		proxy: {
			'/api': {
				target: 'http://localhost:8080', //API服务地址
				changeOrigin: true, //开启跨域
				rewrite: (path) => path.replace(/^\/api/, '')
			}
		}
	}
})